// This file is used to define the store of the application.
// You can define multiple stores in this file.
// 不是 在 main.ts 中注册 store：app.use(createPinia())

import { createPinia } from 'pinia'
// https://prazdevs.github.io/pinia-plugin-persistedstate/
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

import type { App } from 'vue'

const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
const usePinia = (app: App) => {
  app.use(pinia)
}
export default usePinia
